"""
LESSON 09. CONCATENATION.
"""
S = r"C:/HOME/DC/"
print(S)

R = 'Py'+'thon'
print(R)

S1 = 'Hello, '
S2 = 'world!'
S3 = S1 + S2
print(S3)

NAME = 'John'
AGE = 20

print('My name is ' + NAME + " I'm " + str(AGE))

print('hi ' * 5)

T = 'Hello world!'
print(T[0])
print(T[-12])

# +---+---+---+---+---+---+---+---+---+---+---+---+
# | H | e | l | l | o |   | w | o | r | l | d | ! |
# +---+---+---+---+---+---+---+---+---+---+---+---+
# 0   1   2   3   4   5   6   7   8   9  10  11  12
# -12 -11 -10 -9  -8  -7  -6  -5  -4  -3  -2 -1

#[X:Y:Z]

S = 'Hello world!'

print(S[0:12]) #Hello world!
print(S[-1]) #!
print(S[0:5]) #Hello
print(S[:5]) #Hello
print(S[6:]) #world!
print(S[::2]) #Hlowrd
print(S[::-1]) #!dlrow olleH
print(S[:5] + S[6:]) #Helloworld!
